package foliotracker;

/**
 * Abstracts portfolio storage.
 */
public interface IPortfolioRepository
{
	/**
	 * Loads the collection from the specified path.
	 * @param path
	 * @return The loaded collection.
	 * @exception SaveLoadException An error was encountered whilst loading the file.
	 */
	PortfolioCollection load(String path) throws SaveLoadException;
	
	/**
	 * Saves the collection to the specified path.
	 * 
	 * @param path The path to save to.
	 * @param collection The collection to save.
	 * @exception SaveLoadException An error was encountered whilst saving the file.
	 */
	void save(String path, PortfolioCollection collection) throws SaveLoadException;
}
